﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="GlobalInventoryWithWHRptList.aspx.cs" EnableViewState="false" EnableEventValidation="false"
    Inherits="WMS6.Web.Analytics.GlobalInventoryWithWHRptList" %>
<%@ PreviousPageType VirtualPath="~/Analytics/GlobalInventoryWithWHRptQuery.aspx" %>
<%@ Register Src="../UserControls/Pager.ascx" TagName="Pager" TagPrefix="uc1" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
    <title>GlobalInventoryRptList</title>
    <link href="../style/zh/1/css.css" type="text/css" rel="Stylesheet" id="mycss" />
    <link href="../Css/style.css" type="text/css" rel="stylesheet" />

    <script src="../Js/jquery.js" type="text/javascript"></script>

    <script src="../Js/jquery.simplemodal.js" type="text/javascript"></script>

    <script src="../Js/util.js" type="text/javascript"></script>

    <script src="../Js/InitPage.js" type="text/javascript"></script>

    <script src="../Js/checkbox.js" type="text/javascript"></script>

    <script type="text/javascript">
    
      window.onload = function(){
            initListPage();
        }
        
        function returnSearch()
        {
            var from = document.getElementById("hdnFrom").value;
            if(from != "")
            {
                window.location.href = "GlobalInventoryWithWHRptQuery.aspx";
            }
            else
            {
                window.history.go(-1);
            }
        }
    </script>

</head>
<body>
    <form id="F13711" runat="server">
    <div>
        <asp:ScriptManager ID="ScriptManager1" runat="server" />
        <div id="div_List_top">
            <table>
                <tr>
                    <td valign="bottom">
                        <asp:Label ID="lblGlobalInventoryRptList" runat="server" CssClass="label_header"
                            Text="全局库存查询" meta:resourcekey="lblUom"></asp:Label>
                    </td>
                    <td>
                        <asp:Button ID="btnRefresh" runat="server" CssClass="button" Enabled="False" Text="刷新"
                            OnClick="btnRefresh_Click" />
                    </td>
                </tr>
            </table>
        </div>
        <div class="blank8">
        </div>
        <asp:UpdatePanel ID="up1" runat="server">
            <ContentTemplate>
                <div id="div_List">
                    <div id="div_List_msg">
                        <asp:Label ID="lblMsg" runat="server" CssClass="label_message"></asp:Label>
                    </div>
                    <asp:GridView ID="gvGlobalInventory" runat="server" AutoGenerateColumns="False" AllowSorting="True"
                        CssClass="gridview" OnRowDataBound="gvGlobalInventory_RowDataBound" OnSorting="gvGlobalInventory_Sorting"
                        OnInit="gvGlobalInventory_Init" PageSize="20" Width="2600px" meta:resourcekey="gvGlobalInventory">
                        <FooterStyle CssClass="GridViewFooterStyle" />
                        <RowStyle CssClass="GridViewRowStyle" />
                        <HeaderStyle CssClass="GridViewHeaderStyle" />
                        <AlternatingRowStyle CssClass="GridViewAlternatingRowStyle" />
                        <Columns>
                            <asp:BoundField HeaderText="序号" FooterText="序号" meta:resourcekey="BoundField">
                                <ItemStyle CssClass="GridViewRowWidth_40" />
                            </asp:BoundField>
                            <asp:TemplateField meta:resourcekey="TemplateField">
                                <HeaderTemplate>
                                    <img src="../Images/gvSettingpic.gif" id="img01" class="gvSettingImg" onclick="gvUserSetting('13711','gvGlobalInventory');" onmouseover="showGVUserSettingAlt(this);" alt="customize list" />
                                    <asp:CheckBox ID="CheckBox1" runat="server" onclick="selectAll(this,'gvGlobalInventory');"
                                        meta:resourcekey="CheckBox1" />
                                </HeaderTemplate>
                                <ItemTemplate>
                                    <asp:CheckBox ID="chbSelect" runat="server"   meta:resourcekey="chbSelect" />
                                </ItemTemplate>
                                <FooterTemplate>
                                    <asp:CheckBox ID="CheckBox2" runat="server" onclick="selectAll(this,'gvGlobalInventory');"
                                        meta:resourcekey="CheckBox2" />
                                </FooterTemplate>
                                <HeaderStyle HorizontalAlign="Center" CssClass="GridViewRowWidth_40" />
                                <ItemStyle HorizontalAlign="Center" CssClass="GridViewRowWidth_40" />
                            </asp:TemplateField>
                            <asp:BoundField DataField="WH_ID" HeaderText="仓库名称" FooterText="仓库名称" SortExpression="A.WH_ID">
                                <ItemStyle CssClass="GridViewRowWidth_100" />
                            </asp:BoundField>
                            <asp:BoundField DataField="OWNER_ID" HeaderText="货主代码" FooterText="货主代码" SortExpression="A.OWNER_ID">
                                <ItemStyle CssClass="GridViewRowWidth_100" />
                            </asp:BoundField>
                            <asp:BoundField DataField="SKU_ID" HeaderText="货品代码" FooterText="货品代码" SortExpression="A.SKU_ID">
                                <ItemStyle CssClass="GridViewRowWidth_100" />
                            </asp:BoundField>
                            <asp:TemplateField FooterText="货品描述" HeaderText="货品描述" SortExpression="B.SKU_DESCR"
                                meta:resourcekey="SKU_DESCR">
                                <ItemTemplate>
                                    <asp:Label ID="lblSkuDescr" runat="server" Text='<%# Eval("SKU_DESCR").ToString() %>'
                                        meta:resourcekey="lblSkuDescr"></asp:Label>
                                </ItemTemplate>
                                <ItemStyle CssClass="GridViewRowWidth_200" />
                            </asp:TemplateField>
                            <asp:BoundField DataField="SKU_DESCR2" HeaderText="英文名" FooterText="英文名" SortExpression="B.SKU_DESCR2"
                                meta:resourcekey="DESCR2">
                                <ItemStyle CssClass="GridViewRowWidth_150" />
                            </asp:BoundField>
                            <asp:BoundField DataField="SKU_CLASS_ID" HeaderText="货品分类" FooterText="货品分类" SortExpression="B.SKU_CLASS_ID"
                                meta:resourcekey="SKU_CLASS_ID">
                                <ItemStyle CssClass="GridViewRowWidth_100" />
                            </asp:BoundField>
                            <asp:BoundField DataField="SKU_CLASS_DESCR" HeaderText="分类描述" FooterText="分类描述" SortExpression="C.SKU_CLASS_DESCR">
                                <ItemStyle CssClass="GridViewRowWidth_150" />
                            </asp:BoundField>
                            <asp:TemplateField FooterText="库存总数" HeaderText="库存总数" SortExpression="A.QTY">
                                <ItemTemplate>
                                    <asp:Label ID="lblGlobalInventoryQty" runat="server" Text='<%# GetPreferenceDigit(Eval("QTY").ToString()) %>'></asp:Label>
                                </ItemTemplate>
                                <ItemStyle CssClass="GridViewRowWidth_100" />
                            </asp:TemplateField>
                            <asp:BoundField DataField="UOM" HeaderText="单位" FooterText="单位" SortExpression="D.UOM"
                                meta:resourcekey="UOM">
                                <ItemStyle CssClass="GridViewRowWidth_100" />
                            </asp:BoundField>
                            <asp:TemplateField FooterText="好货" HeaderText="好货" SortExpression="OK_QTY">
                                <ItemTemplate>
                                    <asp:Label ID="lblOK" runat="server" Text='<%# GetPreferenceDigit(Eval("OK_QTY").ToString()) %>'
                                        meta:resourcekey="lblOK"></asp:Label>
                                </ItemTemplate>
                                <ItemStyle CssClass="GridViewRowWidth_100" />
                            </asp:TemplateField>
                               <asp:TemplateField FooterText="坏货" HeaderText="坏货" SortExpression="DAMAGE_QTY">
                                <ItemTemplate>
                                    <asp:Label ID="lblBad" runat="server" Text='<%# GetPreferenceDigit(Eval("DAMAGE_QTY").ToString()) %>'></asp:Label>
                                </ItemTemplate>
                                <ItemStyle CssClass="GridViewRowWidth_100" />
                            </asp:TemplateField>
                            <asp:TemplateField FooterText="搁置" HeaderText="搁置" SortExpression="BAD_QTY">
                                <ItemTemplate>
                                    <asp:Label ID="lblDAMAGE" runat="server" Text='<%# GetPreferenceDigit(Eval("BAD_QTY").ToString()) %>'></asp:Label>
                                </ItemTemplate>
                                <ItemStyle CssClass="GridViewRowWidth_100" />
                            </asp:TemplateField>                         
                            <asp:TemplateField FooterText="冻结" HeaderText="冻结" SortExpression="HOLD_QTY">
                                <ItemTemplate>
                                    <asp:Label ID="lblHOLD" runat="server" Text='<%# GetPreferenceDigit(Eval("HOLD_QTY").ToString()) %>'></asp:Label>
                                </ItemTemplate>
                                <ItemStyle CssClass="GridViewRowWidth_100" />
                            </asp:TemplateField>
                            <asp:TemplateField FooterText="预定库存" HeaderText="预定库存" SortExpression="A.ALLOCATED_QTY"
                                meta:resourcekey="ALLOCATED_QTY">
                                <ItemTemplate>
                                    <asp:Label ID="lblALLOCATED_QTY" runat="server" Text='<%# GetPreferenceDigit(Eval("ALLOCATED_QTY").ToString()) %>'
                                        s meta:resourcekey="lblALLOCATED_QTY"></asp:Label>
                                </ItemTemplate>
                                <ItemStyle CssClass="GridViewRowWidth_100" />
                            </asp:TemplateField>
                            <asp:TemplateField FooterText="好货可用库存" HeaderText="好货可用库存" SortExpression="AVAILABLE_INVENTORY"
                                >
                                <ItemTemplate>
                                    <asp:Label ID="lblAVAILABLE" runat="server" Text='<%# GetPreferenceDigit(Eval("AVAILABLE_INVENTORY").ToString()) %>'
                                        ></asp:Label>
                                </ItemTemplate>
                                <ItemStyle CssClass="GridViewRowWidth_100" />
                            </asp:TemplateField>
                            <asp:BoundField DataField="VENDOR_ID" HeaderText="供应商名称" FooterText="供应商名称" SortExpression="E.VENDOR_ID"
                                meta:resourcekey="VENDOR_ID">
                                <ItemStyle CssClass="GridViewRowWidth_200" />
                            </asp:BoundField>
                            <asp:BoundField DataField="EXTERNAL_LOT" HeaderText="外部批号" FooterText="外部批号" SortExpression="E.EXTERNAL_LOT"
                                meta:resourcekey="EXTERNAL_LOT">
                                <ItemStyle CssClass="GridViewRowWidth_100" />
                            </asp:BoundField>
                               <asp:TemplateField FooterText="生产日期" HeaderText="生产日期" 
                                SortExpression="PRODUCE_DATE" meta:resourcekey="PRODUCE_DATE">
                                <ItemTemplate>
                                    <asp:Label ID="lblPRODUCE_DATE" runat="server" 
                                        Text='<%# GetPreferenceShortDate(Eval("PRODUCE_DATE").ToString()) %>' 
                                        meta:resourcekey="lblPRODUCE_DATE"></asp:Label>
                                </ItemTemplate>
                                <ItemStyle CssClass="GridViewRowWidth_150" />
                            </asp:TemplateField>
                            <asp:TemplateField FooterText="总重量" HeaderText="总重量" SortExpression="TOTLE_WGT" >
                                <ItemTemplate>
                                    <asp:Label ID="lblTOTALWGT" runat="server" Text='<%# GetPreferenceDigit(Eval("TOTLE_WGT").ToString()) %>'
                                        meta:resourcekey="lblTOTALWGT"></asp:Label>
                                </ItemTemplate>
                                <ItemStyle CssClass="GridViewRowWidth_100" />
                            </asp:TemplateField>
                            <asp:TemplateField FooterText="总体积" HeaderText="总体积" SortExpression="TOTLE_CUBE" >
                                <ItemTemplate>
                                    <asp:Label ID="lblTOTALCUBE" runat="server" Text='<%# GetPreferenceDigit(Eval("TOTLE_CUBE").ToString()) %>'
                                        meta:resourcekey="lblTOTALCUBE"></asp:Label>
                                </ItemTemplate>
                                <ItemStyle CssClass="GridViewRowWidth_100" />
                            </asp:TemplateField>
                            <asp:TemplateField FooterText="最后入库时间" HeaderText="最后入库时间" SortExpression="INBOUND_DATE"
                                >
                                <ItemTemplate>
                                    <asp:Label ID="lblEXPECTED_RECEIPT_DATE" runat="server" Text='<%# GetPreferenceShortDate(Eval("INBOUND_DATE").ToString()) %>'
                                        meta:resourcekey="lblEXPECTED_RECEIPT_DATE"></asp:Label>
                                </ItemTemplate>
                                <ItemStyle CssClass="GridViewRowWidth_150" />
                            </asp:TemplateField>
                            <asp:TemplateField FooterText="最后出库时间" HeaderText="最后出库时间" SortExpression="OUTBOUND_DATE"
                                meta:resourcekey="SHIPPED_DATE">
                                <ItemTemplate>
                                    <asp:Label ID="lblRECEIPT_DATE" runat="server" Text='<%# GetPreferenceShortDate(Eval("OUTBOUND_DATE").ToString()) %>'
                                        meta:resourcekey="lblRECEIPT_DATE"></asp:Label>
                                </ItemTemplate>
                                <ItemStyle CssClass="GridViewRowWidth_150" />
                            </asp:TemplateField>
                        </Columns>
                    </asp:GridView>
                </div>
                <div id="div_pager">
                    <uc1:Pager ID="PagerFooter" runat="server" OnFirst="btnFirst_Click" OnPrevious="btnPrevious_Click"
                        OnNext="btnNext_Click" OnLast="btnLast_Click" OnGoTo="GoTo_Click" />
                </div>
                <input type="hidden" runat="server" id="hdnFrom" />
            </ContentTemplate>
        </asp:UpdatePanel>
        <input type="hidden" id="hdnActionID" runat="server" />
        <div id="div_List_bottom">
            <table>
                <tr>
                    <td>
                        <asp:Button ID="btnSearch" runat="server" Text="<%$Resources:ButtonResource,btnNewSearch%>"
                            CssClass="button" Enabled="False" OnClientClick="javascript:window.location.href='GlobalInventoryWithWHRptQuery.aspx';return false;" />
                    </td>
                    <td>
                        <asp:Button ID="btnReSearch" runat="server" Text="<%$Resources:ButtonResource,btnReSearch%>"
                            CssClass="button" Enabled="False" OnClientClick="javascript:returnSearch();return false;" />
                    </td>
                    <td>
                        <asp:Button ID="btnList" runat="server" Text="<%$Resources:ButtonResource,btnList%>"
                            CssClass="button" Enabled="False" OnClick="btnList_Click" />
                    </td>
                    <td>
                        <asp:Button ID="btnExport" runat="server" Text="<%$Resources:ButtonResource,btnExport%>"
                            CssClass="button" Enabled="False" OnClick="btnExport_Click" />
                    </td>
                </tr>
            </table>
        </div>
    </div>
    </form>
</body>
</html>
